﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TaskScheduler;

namespace ADAuthentication.Web
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        { 
            try
            {
                TaskScheduler.TaskSchedulerClass taskService = new TaskScheduler.TaskSchedulerClass();
                taskService.Connect();
                IRunningTaskCollection taskCollection = taskService.GetRunningTasks(1);
                foreach (IRunningTask task in taskCollection)
                {
                    string name = task.Name;
                }
            }
            catch (Exception error)
            { 
            }
        }
    }
}